<script type="text/javascript">
$(document).ready(function(){
	//��֤
	threshold.validate();
	 var strval=$("select[name=type]").attr("value");
	 $("select[name=type] option").each(function(){
	  if (this.value==strval){
	   $(this).attr("selected",true);
	   //alert(this.selected);
	   return true
	  }
	 });
});
</script>
<form method="post" id="editThresholdForm"
	action="${basePath}/system/threshold/save">
	<div class="main_Receipt_table" id="base">
	<input type="hidden" name="id" value="${entity.id}" /> 
		<div class="main_Receipt_table_m">
			<table id="editUserTable" border="0" cellspacing="0" cellpadding="0">
				<tbody>
					<!-- <tr>
						<th style="width: 30%;" scope="row"><@spring.message code='threshold.type'/><span
							class="color_red">*</span></th>
						<td style="width: 70%;"><select
							style="width: 54%;height: 24px;" id="type" name="type" value="${entity.type}" disabled="disabled">
									<option value=0 >CPU_Threshold</option>
									<option value=1 >MEM_Threshold</option>
									<option value=2 >DIR_Threshold</option>
									<option value=3 >INTERVAL_Threshold</option>
									<option value=4 >GLOBAL_Threshold</option>
									<option value=5 >POOL_Threshold</option>
									<option value=6 >OSD_Threshold</option>
						</select></td>
					</tr> -->
					<#if entity.type < 7>
					<tr>
						<th style="width: 30%;" scope="row"><@spring.message code='threshold.val'/><span
							class="color_red">*</span></th>
						<td style="width: 70%;">
							<input id="val" type="text" name="val"value="${entity.val}" />
						</td>
					</tr>
					</#if>
					<input id="creator" name="creator" value="${entity.creator}" type="hidden"/>	
					<input id="type" name="type" value="${entity.type}" type="hidden">
					<#if entity.type != 3>
					<tr>
						<th style="width: 30%;" scope="row"><@spring.message code='threshold.importance'/><span
							class="color_red">*</span></th>
						<td style="width: 70%;">
							<input type="radio" name="importance" class="xm_zh_receiptradio"value="0" <#if entity.importance == 0>checked="checked"</#if>>
								<@spring.message code='threshold.invalid'/>
							</input> 
							<input type="radio" name="importance" class="xm_zh_receiptradio"value="1" <#if entity.importance == 1>checked="checked"</#if>>
								<@spring.message code='threshold.low'/>
							</input> 
							<input type="radio" name="importance" class="xm_zh_receiptradio"value="2" <#if entity.importance == 2>checked="checked"</#if>>
								<@spring.message code='threshold.middle'/>
							</input> 
							<input type="radio" name="importance" class="xm_zh_receiptradio"value="3" <#if entity.importance != 0 && entity.importance != 1 && entity.importance !=2 >checked="checked"</#if>>
								<@spring.message code='threshold.high'/>
							</input> 
						</td>
					</tr>
					</#if>
					<!-- <tr>
						<th style="width: 30%;" scope="row"><@spring.message code='threshold.creator'/><span
							class="color_red">*</span></th>
						<td style="width: 70%;"><input id="creator" type="text" name="creator"
							value="${entity.creator}" readonly="readonly"/></td>
					</tr> -->
				</tbody>
			</table>
		</div>
	</div>
</form>
